Component({
  pageLifetimes: {
    show() {
      if (typeof this.getTabBar === 'function' &&
        this.getTabBar()) {
        this.getTabBar().setData({
          selected: '/pages/warehouse/warehouse'
        })
      }
    }
  },
  methods: {
    addWarehouse() {
      wx.navigateTo({
        url: '/pages/warehouse/add/addWarehouse?pageType=edit'
      })
    }
  }
})